
package common;

public class RentAttribute extends ItemAttributeTag {

  protected String createText() {
    RentDetail rent = (RentDetail) item;

    if ((attribute == null) ||
        (attribute.equalsIgnoreCase("id"))) {
      return (String.valueOf(rent.getId()));
    } else if (attribute.equalsIgnoreCase("section")) {
      return (rent.getSection());
    } else if (attribute.equalsIgnoreCase("building")) {
      return (rent.getBuilding());
    } else if (attribute.equalsIgnoreCase("room")) {
      return (rent.getRoom());
    } else if (attribute.equalsIgnoreCase("customer")) {
      return (rent.getCustomer());        
    } else if (attribute.equalsIgnoreCase("year")) {
      return (String.valueOf(rent.getYear()));
    } else if (attribute.equalsIgnoreCase("month")) {
      return (String.valueOf(rent.getMonth()));
    } else if (attribute.equalsIgnoreCase("money")) {
      return (String.valueOf(rent.getMoney()));    
    } else if (attribute.equalsIgnoreCase("gets")) {
      return (String.valueOf(rent.getGets())); 
     } else if (attribute.equalsIgnoreCase("getsStr")) {
      return (String.valueOf(rent.getGetsStr())); 
    } else return(null);
  }
}
